#include "iBe.h"

int Handle::nextId = 1;

Handle::Handle()
{
  id = INVALID_HANDLE;
}

Handle::Handle(int _id)
{
  id = _id;
}

Handle::Handle(const Handle& _handle)
{
  id = _handle.id;
}

int Handle::getId() const
{
  return id;
}

bool Handle::isInvalid() const
{
  return id == INVALID_HANDLE;
}

Handle Handle::getNewHandle()
{
  Handle ret(nextId++);
  return ret;
}
